//
//  BHComSwitchCell.swift
//  BigHealth
//
//  Created by 蔺百好 on 2021/6/24.
//

import UIKit

class BHComSwitchCell: UITableViewCell {
    
    var changeStateValueActBlock:((Bool) -> Void)?
    

    @IBOutlet weak var name_label: UILabel!
    
    @IBOutlet weak var swithBtn: UISwitch!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    var model: BHFunCreateRowModel! {
        didSet {
            self.name_label.text = model.name
        }
    }
    
    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    @IBAction func changeStateAct(_ sender: UISwitch) {
        self.changeStateValueActBlock?(sender.isOn)
    }
    
}
